package com.ruleengine.db.model;

import com.baomidou.mybatisplus.annotation.EnumValue;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
public enum RuleType {

    JSON_FILTER(0),
    JSON_MAP(1),
    DEST_BIFROMQ(2),
    DEST_KAFKA(3);

    @Getter
    @EnumValue
    private final int statusCode;

    public boolean isDestRuleType() {
        return this == DEST_BIFROMQ || this == DEST_KAFKA;
    }

    public boolean isComputeRuleType() {
        return this == JSON_FILTER || this == JSON_MAP;
    }

}
